/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package meteocal.business.entity;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 *
 * @author luana
 */
@Entity
@Table(name = "EVENT_DELETED")
@NamedQueries({
    @NamedQuery(name = "EventDeleted.findAll", query = "SELECT e FROM EventDeleted e"),
    @NamedQuery(name = "EventDeleted.findByIdEvent", query = "SELECT e FROM EventDeleted e WHERE e.idEvent = :idEvent"),
    @NamedQuery(name = "EventDeleted.findByName", query = "SELECT e FROM EventDeleted e WHERE e.name = :name"),
    @NamedQuery(name = "EventDeleted.findByStartingDate", query = "SELECT e FROM EventDeleted e WHERE e.startingDate = :startingDate"),
    @NamedQuery(name = "EventDeleted.findByStartingTime", query = "SELECT e FROM EventDeleted e WHERE e.startingTime = :startingTime"),
    @NamedQuery(name = "EventDeleted.findByEndingDate", query = "SELECT e FROM EventDeleted e WHERE e.endingDate = :endingDate"),
    @NamedQuery(name = "EventDeleted.findByEndingTime", query = "SELECT e FROM EventDeleted e WHERE e.endingTime = :endingTime"),
    @NamedQuery(name = "EventDeleted.findByPlace", query = "SELECT e FROM EventDeleted e WHERE e.place = :place"),
    @NamedQuery(name = "EventDeleted.findByType", query = "SELECT e FROM EventDeleted e WHERE e.type = :type"),
    @NamedQuery(name = "EventDeleted.findByPrivacyLevel", query = "SELECT e FROM EventDeleted e WHERE e.privacyLevel = :privacyLevel"),
    @NamedQuery(name = "EventDeleted.findByExpectedWeather", query = "SELECT e FROM EventDeleted e WHERE e.expectedWeather = :expectedWeather"),
    @NamedQuery(name = "EventDeleted.findByCreator", query = "SELECT e FROM EventDeleted e WHERE e.creator = :creator")})
public class EventDeleted implements Serializable {
    private static final long serialVersionUID = 1L;
    
    public static final String FIND_BY_IDEVENT = "EventDeleted.findByIdEvent";
    
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID_EVENT")
    private Integer idEvent;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 45)
    @Column(name = "NAME")
    private String name;
    @Lob
    @Size(max = 2147483647)
    @Column(name = "DESCRIPTION")
    private String description;
    @Basic(optional = false)
    @NotNull
    @Column(name = "STARTING_DATE")
    @Temporal(TemporalType.DATE)
    private Date startingDate;
    @Basic(optional = false)
    @NotNull
    @Column(name = "STARTING_TIME")
    @Temporal(TemporalType.TIME)
    private Date startingTime;
    @Basic(optional = false)
    @NotNull
    @Column(name = "ENDING_DATE")
    @Temporal(TemporalType.DATE)
    private Date endingDate;
    @Basic(optional = false)
    @NotNull
    @Column(name = "ENDING_TIME")
    @Temporal(TemporalType.TIME)
    private Date endingTime;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 45)
    @Column(name = "PLACE")
    private String place;
    @Basic(optional = false)
    @Column(name = "TYPE")
    private boolean type;
    @Basic(optional = false)
    @Column(name = "PRIVACY_LEVEL")
    private boolean privacyLevel;
    @Basic(optional = false)
    @Column(name = "EXPECTED_WEATHER")
    private int expectedWeather;
    @Basic(optional = false)
    @Size(min = 1, max = 255)
    @Column(name = "CREATOR")
    private String creator;

    public EventDeleted() {
    }

    public EventDeleted(Integer idEvent) {
        this.idEvent = idEvent;
    }

    public EventDeleted(Integer idEvent, String name, Date startingDate, Date startingTime, Date endingDate, Date endingTime, String place, String creator) {
        this.idEvent = idEvent;
        this.name = name;
        this.startingDate = startingDate;
        this.startingTime = startingTime;
        this.endingDate = endingDate;
        this.endingTime = endingTime;
        this.place = place;
        this.creator = creator;
    }

    public Integer getIdEvent() {
        return idEvent;
    }

    public void setIdEvent(Integer idEvent) {
        this.idEvent = idEvent;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Date getStartingDate() {
        return startingDate;
    }

    public void setStartingDate(Date startingDate) {
        this.startingDate = startingDate;
    }

    public Date getStartingTime() {
        return startingTime;
    }

    public void setStartingTime(Date startingTime) {
        this.startingTime = startingTime;
    }

    public Date getEndingDate() {
        return endingDate;
    }

    public void setEndingDate(Date endingDate) {
        this.endingDate = endingDate;
    }

    public Date getEndingTime() {
        return endingTime;
    }

    public void setEndingTime(Date endingTime) {
        this.endingTime = endingTime;
    }

    public String getPlace() {
        return place;
    }

    public void setPlace(String place) {
        this.place = place;
    }

    public boolean getType() {
        return type;
    }

    public void setType(boolean type) {
        this.type = type;
    }

    public boolean getPrivacyLevel() {
        return privacyLevel;
    }

    public void setPrivacyLevel(boolean privacyLevel) {
        this.privacyLevel = privacyLevel;
    }

    public int getExpectedWeather() {
        return expectedWeather;
    }

    public void setExpectedWeather(int expectedWeather) {
        this.expectedWeather = expectedWeather;
    }

    public String getCreator() {
        return creator;
    }

    public void setCreator(String creator) {
        this.creator = creator;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idEvent != null ? idEvent.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof EventDeleted)) {
            return false;
        }
        EventDeleted other = (EventDeleted) object;
        if ((this.idEvent == null && other.idEvent != null) || (this.idEvent != null && !this.idEvent.equals(other.idEvent))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "meteocal.business.entity.EventDeleted[ idEvent=" + idEvent + " ]";
    }
    
}
